package jsp_0810;

import java.io.*;
import java.util.*;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class HelloWorld
 */
@WebServlet("/HelloWorld")
public class HelloWorld extends HttpServlet {
       
    public HelloWorld() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		System.out.println("HelloWorld doGet 메서드 호출");
		System.out.println(new Date());
		//응답을 euc-kr인코딩으로 함
		response.setCharacterEncoding("EUC-KR");
		//response
		PrintWriter pw = response.getWriter();
		pw.write("서버 접속");
		pw.write("This ip is 211.183.2.97 ");
		pw.write(new java.util.Date().toString());
		pw.close();
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}

}
